package com.flyduck.vueshop.cart.feign;

import com.flyduck.vueshop.cart.fallback.RemoteCartItemFallback;
import com.flyduck.vueshop.cart.vo.RemoteCartItemRespVO;
import com.flyduck.vueshop.common.core.lang.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * <p>
 * RemoteCartItemFeignClient
 * </p>
 *
 * @author flyduck
 * @since 2024-07-23
 */
@FeignClient(value = "vueshop-service-cart",contextId = "remoteCartItemFeignClient",fallback = RemoteCartItemFallback.class)
public interface RemoteCartItemFeignClient {

    @PostMapping("/cart/remote/cartItem/getCartItemListByIds")
    Result<List<RemoteCartItemRespVO>> getCartItemListByIds(@RequestBody List<Long> ids);

    @PostMapping("/cart/remote/cartItem/deleteByIds")
    Result<Void> deleteByIds(@RequestBody List<Long> ids);
}
